package com.lyj.service.impl;

import com.lyj.mapper.EmployeeMapper;
import com.lyj.pojo.Employee;
import com.lyj.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> findAllEmp(Employee employee) {
        return employeeMapper.findAllEmp(employee);
    }

    @Override
    public Employee findEmpById(Integer id) {
        return employeeMapper.findEmpById(id);
    }

    @Override
    public void updateEmpById(Employee employee) {
        employeeMapper.updateEmpById(employee);
    }

    @Override
    public void addEmp(Employee employee) {
        employeeMapper.addEmp(employee);
    }

    @Override
    public void deleteEmpById(Integer id) {
        employeeMapper.deleteEpmById(id);
    }
}
